import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { Button ,  NavBar , Tabbar , TabbarItem
    , Icon, Search , Divider , TreeSelect , Empty ,Cell, Image as VanImage
    , Uploader,Form,Field,CellGroup,Card,Toast,Notify,TextEllipsis
    , Swipe , SwipeItem , NoticeBar,Badge,FloatingBubble,PasswordInput,NumberKeyboard,
    Stepper,Dialog,Tab, Tabs ,Popup,Loading,Switch,CountDown,ActionSheet,
    Skeleton,SkeletonTitle,SkeletonImage,SkeletonAvatar,SkeletonParagraph,Grid,GridItem,Collapse,CollapseItem,Popover} from 'vant';


import routes from "./config/route.ts";

import { createPinia } from 'pinia';//使用pinia仓库

import {createRouter, createWebHistory} from 'vue-router';

//引入element-plus组件库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'



const router = createRouter({
    history: createWebHistory(),
    routes,
})


const app = createApp(App);

//使用pinia仓库
const pinia = createPinia();
app.use(pinia);



//使用 Vant 组件
app.use(Popover);
app.use(Collapse);
app.use(CollapseItem);
app.use(Skeleton);
app.use(SkeletonTitle);
app.use(SkeletonImage);
app.use(SkeletonAvatar);
app.use(SkeletonParagraph);
app.use(Button);
app.use(NavBar);
app.use(Tabbar);
app.use(TabbarItem);
app.use(Icon);
app.use(Search);
app.use(Divider);
app.use(TreeSelect);
app.use(Empty);
app.use(Cell);
app.use(VanImage);
app.use(Uploader);
app.use(Form);
app.use(Field);
app.use(CellGroup);
app.use(Card);
app.use(Toast);
app.use(Notify);
app.use(TextEllipsis);
app.use(Swipe);
app.use(SwipeItem);
app.use(NoticeBar);
app.use(Badge);
app.use(FloatingBubble);
app.use(PasswordInput);
app.use(NumberKeyboard);
app.use(Stepper);
app.use(Dialog);
app.use(Tab);
app.use(Tabs);
app.use(Popup);
app.use(Loading);
app.use(Switch);
app.use(CountDown);
app.use(ActionSheet);
app.use(Grid);
app.use(GridItem);

app.use(ElementPlus);//额外组件
app.use(router);


// 必须先去创建，使用，再挂载
app.mount('#app');